home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ABUSESRC.ZIP / AbuseSrc / macabuse / imlib / include / macs.hpp < prev    next >
C/C++ Source or Header  |  1997-05-20  |  716b  |  35 lines

  1. #ifndef MACS__
  2. #define MACS__
  3. #include "system.h"
  4. #include "dprint.hpp"
  5. #include <stdio.h>
  6.  
  7. #define ERROR(x,st) { if (!(x)) \
  8.    { dprintf("Error on line %d of %s : %s\n", \
  9.      __LINE__,__FILE__,st); exit(1); } }
  10.  
  11. // These macros should be removed for the non-debugging version
  12. #ifdef NO_CHECK
  13. #define CONDITION(x,st) 
  14. #define CHECK(x) 
  15. #else
  16. #define CONDITION(x,st) ERROR(x,st)
  17. #define CHECK(x) CONDITION(x,"Check stop");
  18. #endif
  19.  
  20.  
  21. #ifndef min
  22. #define min(x,y) (x<y ? x:y)
  23. #endif
  24. #ifndef max
  25. #define max(x,y) (x>y ? x:y)
  26. #endif
  27.  
  28. #define uchar  unsigned char
  29. #define schar  signed char
  30. #define ushort unsigned short
  31. #define sshort signed short
  32. #define ulong  unsigned long
  33.  
  34. #endif
  35.